Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

Previous | Chapter Top | Chapter Contents | Next |

Function Provided by the Generic Music Component

The generic music component implements the following function that a client music component can call.

MusicGenericConfigure

You use the MusicGenericConfigure function to tell the generic music component what services your music component requires and to point to any resources that are necessary.

pascal ComponentResult MusicGenericConfigure (
                     MusicComponent mc,
                     long mode,
                     long flags,
                     long baseResID);
mc
Specifies the instance of the generic music component. Your software obtains this reference when calling the Component Manager's OpenComponent or OpenDefaultComponent function.
mode
Must be 0 .
flags
Flags that control the importation of MIDI files. These flags are described in "MIDI File Import Flags" .
baseResID
The resource ID of the lowest-numbered resource used by your music component.
Possible flags for the flags parameter are:
 
kGenericMusicDoMIDI
Implement normal MIDI messages for note, controllers, and program changes 0-127.
kGenericMusicBank0...kGenericMusicBank32
If kGenericMusicBank0 is set, then bank changes for instruments numbered above 127 will be send on controller zero; if kGenericMusicBank32 , then on controller 32. If both flags are set, then the bank is sent on controller zero, and then a zero value is sent to controller 32
kGenericMusicErsatzMIDI
Some musical devices, such as NuBus cards, may internally be driven by a MIDI stream, but should not appear to the user to be an external MIDI device. The kGenericMusicErsatzMIDI flag instructs the generic music component to allocate channels appropriately, and construct MIDI packets. The MIDI packets are always sent to the routine MusicDerivedMIDISend , and never to an external MIDI port.
kGenericMusicCallKnobs
Specifies that your music component should receive calls to its routine MusicDerivedSetKnob for changes to global or part knobs. This flag should be set if your component implements any knobs.
kGenericMusicCallParts
Specifies that your music component should receive calls to its routine MusicDerivedSetPart , in order to alter a specific part's polyphony or, in the case of a MIDI device, MIDI channel number.
kGenericMusicCallInstrument
Specifies that your music component should receive calls to its routine MusicDerivedSetInstrument , in order to set a part to an new instrument. This is for devices that support complete user-instruments with knob lists. If this flag is not set, then the generic music component will call your music component many times to set the value of each knob in the instrument.
kGenericMusicCallNumber
Directs the generic music component to call you music component's MusicDerivedSetInstrumentNumber function, rather than sending standard MIDI program- and bank-change messages.
kGenericMusicCallROMInstrument
Allows instruments that appear to the user as instruments built into the synthesizer to be stored in the derived component's resource file, as 'ROMi' resources. The derived component will get a call to MusicDerivedSetInstrument when one of these instruments is requested.

DISCUSSION

The baseResID parameter will be the lowest resource ID used by your component for the standard resources described above. Since the resource numbers are relative to this, you can include several music components in a single system extension.

RESULT CODES

To be provided.


© 1999 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next